"""封装shell命令"""
import subprocess


class Shell:
    @staticmethod
    def execute(cmd):
        output, errors = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
        out_msg = output.decode("gbk")
        return out_msg
